home *** CD-ROM | disk | FTP | other *** search
-
-
- Import-Wavefront() Unix Programmer's Manual Import-Wavefront()
-
-
- NAME
- imp_wavefront - Wavefront .OBJ geometry import filter
-
- SYNOPSIS
-
- This man page describes the options specific to the Wavefront .OBJ
- geometry import converter.
-
- EXAMPLE CONVERSION SYNTAX
-
- To convert a Wavefront file to 3D Studio using the default parameters
- listed in the setup.ini file:
-
- pt -i wave -o 3ds filename.obj
-
- To convert a Wavefront file to VRML and override some of the default
- options in setup.ini:
-
- pt -i wave -in-wave-print-stats = yes -o 3ds filename.obj
-
- OVERVIEW
-
- This geometry import converter reads in Wavefront 'OBJ' format files in
- their entirety, including vertex, normal and texture coordinates, as well
- as grouping and smoothing information. Many companies which sell 3D
- models provide their datasets in the OBJ file format, so you can use this
- converter to read in these data files and be guaranteed nice rendered
- results.
-
- The converter will also read material definitions from a Wavefront
- material file (typically which has a file extension '.mtl') if the
- material file is referenced within the Wavefront geometry file (typically
- which has a file extension '.obj') using the 'mtllib' keyword. If one or
- more Wavefront material files are listed on a single line then all will
- be read into memory for possible reference by the geometry file.
-
- The converter first reads the entire file into memory; this includes the
- vertex, normal and texture coordinate lists, their indice lists, all
- group names, material names and texture names, and the smoothing groups
- assigned to each polygon. Next, the converter computes new vertex normals
- for polygons that don't have any normals and that have a non-zero
- smoothing group assigned to them. If no smoothing groups are found then
- the converter optionally creates smoothed vertex normals based on the
- angle between abutting polygon faces. As a last step, the polygonal data
- is separated into separate objects based on a user-chosen criteria.
-
- NOTES:
-
- If any texture map names are found in the file (ie: if the 'usemap
- <map_name>' command is specified in the file) and the '-in-wave-
- surf-name-src' option of this converter is set to 'use-mat-name'
- then texture definitions will be automatically created for these
- texture names and will be assigned to their corresponding surfaces.
- NOTE:: you can distinguish these textured surfaces because the
- texture map name is appended to the end of the surface name (the
- surface and texture names are separated by three underscores '_').
-
-
- 1
-
-
-
- Import-Wavefront() Unix Programmer's Manual Import-Wavefront()
-
-
- If one or more group names are found on a 'g' line then they are
- appended all together to form the group name used internally (ie: 'g
- all airplane tail_fin').
-
- COMMAND LINE OPTIONS
-
- The following options are specific to this import converter:
-
- -i wave
- This is the optional command line option which specifies that the
- input data is in the Wavefront .OBJ file format. If not specified
- then the converter will try to guess the input file's format from
- its file extension (.obj) and then from the contents of its file.
-
- -in-wave-do-smoothing = [ yes | no ]
- If set to 'yes' then new vertex normals will be automatically
- computed for a polygon based on the smoothing group numbers located
- within the .OBJ file. Note: if explicit vertex normals are already
- associated with a specific polygon then automatically generated
- normals will not be computed for that polygon. Also note that for
- smoothing to take place two or more polygons must be abutting and
- share the same vertices.
-
- -in-wave-compute-avg-normals = [ yes | no ]
- If set to 'yes' then new vertex normals will be computed for a
- polygon if it does not already have any vertex normals, and it does
- not have a smoothing group assigned to it or the '-in-wave-do-
- smoothing' option described above is set to 'no. The smoothing
- criterion is based on the angle between abutting polygons; smoothed
- vertex normals will be computed if the angle between two polygons'
- geometric surfaces normals is less than the angle specified with the
- '-in-wave-smoothing-angle' option described below.
-
- -in-wave-smoothing-angle = #
- This option sets the cut-off smoothing angle (in degrees) used by
- the vertex normal computation algorithm. If the angle between two
- abutting polygons is greater than this number then no smoothing will
- occur (a crease will be evident between the two polygons), else
- smoothing will occur where the polygons meet. The default angle is
- 30 degrees.
-
- -in-wave-print-stats = [ yes | no ]
- If set to 'yes' then statistics about the geometry file will be
- reported once it has been read in and processed.
-
- -in-wave-print-warn
- If set to 'yes' then warning messages will be reported as the file
- is read in. Warnings include unrecognized input and options, out-of-
- range texture coordinates and out-of-range index values.
-
- -in-wave-surf-name-src = [ use-mat-else-group-name | use-mat-name | use-
- group-name | use-object-name ]
-
-
-
-
-
-
- 2
-
-
-
- Import-Wavefront() Unix Programmer's Manual Import-Wavefront()
-
-
- This option specifies which method the converter is to use to assign
- a surface definition (a material) to each polygon. Automatic
- assignment of surfaces to the polygons will save you a lot of time
- and headache.
-
- The 'use-mat-else-group-name' option uses the material name found in
- the file as the new surface name, else it uses the group name as the
- new surface name, else if uses the object name as the new surface
- name
- if no material name is associated with the current polygon(s). If
- no material or group name is assigned then the "default" surface
- will be used. This option is the default.
-
- The 'use-mat-name' option uses the material name found in file, else
- it uses the "default" surface if no material name is found.
-
- The 'use-group-name' option uses the group name found in the file,
- else it uses the "default" surface if no group name is found.
-
- The 'use-object-name' option uses the object name found in the file,
- else it uses the "default" surface if no object name is found.
-
- -in-wave-split-method = [ off | by-group-name | by-object-name | by-mat-
- name | by-txtr-name | by-smoothing-num ]
-
- This option selects which criterion is to be used when the polygonal
- data is to be split up into different objects. If your 3D scene is
- going to have many different objects in it then it is recommended
- that the OBJ not be split up. However, if you want to modify each
- individual part in the OBJ file then you will want to split it up
- into different objects.
-
- The 'off' option disables the OBJ file from being split up into
- separate objects.
-
- The 'by-group-name' option will split the polygonal geometry
- according to the group name assigned to each polygon. It is the most
- logical method for splitting the geometry since the group names are
- usually assigned on an object-name basis by the person who designed
- the 3D model. Groups are assigned to polygons in the OBJ file by
- preceding them with a line like: 'g <group_name1> ...
- <group_nameN>'.
-
- The 'by-object-name' option will split the polygonal geometry
- according to the object name assigned to each polygon. Groups are
- assigned to polygons in the OBJ file by preceding them with a line
- like: 'o <object_name>'.
-
- The 'by-mat-name' option will split the polygonal geometry according
- to the material name assigned to each polygon. You may want to use
- this method if no group names are provided in the file or if it
- makes more sense to split by material name than by group name (for
- example, the object might have 300 odd group names but 20 carefully
- chosen material names). Materials are assigned to polygons in the
- OBJ file by preceding them with a line like: 'usemtl
- <material_name>'.
-
-
- 3
-
-
-
- Import-Wavefront() Unix Programmer's Manual Import-Wavefront()
-
-
- The 'by-txtr-name' option will split the polygonal geometry
- according to the texture map name assigned to each polygon. In most
- cases you will not use this method. Texture map names are assigned
- to polygons in the OBJ file by preceding them with a line like:
- 'usemap <texture_map_name>'.
-
- The 'by-smoothing-num' option will split the polygonal geometry
- according to the smoothing group number assigned to each polygon.
- Since smoothed polygons are usually clustered together as one sub-
- object this method can be used to accurately extract sub-objects
- from the polygonal data. However, it will probably create many more
- new objects than would the 'by-group-name' method above. Smoothing
- groups are assigned to polygons in the OBJ file by preceding them
- with a line like: 's <smoothing_number>'.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-